var pgoldinfo=JSON.parse(sessionStorage.pgoldinfo||'{}');
var user_info=JSON.parse(localStorage.user_info||'{}');
var zhanchuntimu=JSON.parse(sessionStorage.zhanchuntimu||'{}');
var arranswers={};
function getQueryString(name) { 
    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); 
    var r = window.location.search.substr(1).match(reg); 
    if (r != null) return unescape(r[2]); 
    return null; 
} 
var tsobj={
		assessPosition: "1",//评估题数
		Positionid:'question_7',
		falseshow:true,
		assessName: "小腿围（CC） cm",//评估标题
		assessId: "",//题目下勾选的项空或null为没做此题
		assesslist: [ //选项列表
			{
				assessContent:"CC＜31(0分)",//选项内容
				assessfenzhi:'0',
			},
			{
				assessContent:"CC≥31(1分)",//选项内容
				assessfenzhi:'1',
			},
		]
	}
var tsobj2={
		assessPosition: "1",//评估题数
		Positionid:'question_6',
		falseshow:true,
		assessName: "身体质量指数 BMI Kg/m2 即：体重（千克）/身高（米）的平方",//评估标题
		assessId: "",//题目下勾选的项空或null为没做此题
		assesslist: [ //选项列表
			{
				assessContent:"BMI ＜19(0分)",//选项内容
				assessfenzhi:'0',
			},
			{
				assessContent:"9≤BMI＜21(1分)",//选项内容
				assessfenzhi:'1',
			},
			{
				assessContent:"21≤BMI＜23(2分)",//选项内容
				assessfenzhi:'2',
			},
		]
	}
var pglx=getQueryString('id');
var timu='';
var dengjiarr='';
if(pglx=='zlnl_pg'){
	timu=assessResponse;
	dengjiarr=dengjitext.zlnl_pg;
}else if(pglx=='zn_pg'){
	timu=assessResponse2;
	document.getElementById('pingguname').innerHTML='智能评估';
	dengjiarr=dengjitext.zn_pg;
}else if(pglx=='lngnzkzh_pg'){
	timu=assessResponse3;
	document.getElementById('pingguname').innerHTML='老人功能状况评估';
	dengjiarr=dengjitext.lngnzkzh_pg;
}else if(pglx=='ddfx_pg'){
	timu=assessResponse4;
	document.getElementById('pingguname').innerHTML='跌倒风险评估';
	dengjiarr=dengjitext.ddfx_pg;
}else if(pglx=='ddfx-frat_pg'){
	timu=assessResponse5;
	document.getElementById('pingguname').innerHTML='跌倒风险FRAT评估';
	dengjiarr=dengjitext['ddfx-frat_pg'];
}else if(pglx=='yyfx_pg'){
	timu=assessResponse6;
	document.getElementById('pingguname').innerHTML='营养风险评估';
	dengjiarr=dengjitext.yyfx_pg;
}else if(pglx=='wxzxfx_pg'){
	timu=assessResponse7;
	document.getElementById('pingguname').innerHTML='误吸窒息风险评估';
	dengjiarr=dengjitext.wxzxfx_pg;
}else if(pglx=='yy_pg'){
	timu=assessResponse8;
	document.getElementById('pingguname').innerHTML='抑郁评估';
	dengjiarr=dengjitext.yy_pg;
}else if(pglx=='ycfx_pg'){
	timu=assessResponse9;
	document.getElementById('pingguname').innerHTML='压疮风险评估';
	dengjiarr=dengjitext.ycfx_pg;
}
var main = new Vue({
	el: '#main',
	data: {
		pglx:getQueryString('id'),//评估类型
		oldman:pgoldinfo,
//		jcjborhbsj:'',//疾病名称及时间
//		jzyy:'',//就诊原因
		jjpg:'1',//是否是居家评估
		pgri:(new Date()).toLocaleDateString(),//日期
		pgry:user_info.name,//评估人员
		assessResponse:zhanchuntimu.pgnr ? JSON.parse(zhanchuntimu.pgnr):timu,
		zhanchuntimu:zhanchuntimu,
		Popupshow:false,//弹窗是否显示
		assessnum:0,//第几题
		assessstyle:0,//答题状态0未完成答题1完成答题2上传成功3上传失败
		ip:localStorage.ip,
		sfscpg:'0',//首次评估1,非首次0
		pgcs:'1',//评估次数
		pgjgmc:'',//评估等级
		pgzhongfeng:'--',//评估总分
		yfcsqt:'',//其他预防措施
		dengjiarr:dengjiarr
	},
	computed: {
		completed:function(){
			var hasnum = 0;
			for (var i=0;i<this.assessResponse.length;i++){
				if(this.assessResponse[i].assessId){
					hasnum++
				}
			}
			return hasnum
		}
	},
	watch: {
	    assessResponse: {
		    	handler:function(val,oldVal){
		      if(pglx=='yyfx_pg'){
		      	if(val[5].assessId=="0"){
		      		this.assessResponse[6].Positionid=tsobj2.Positionid;
		      		this.assessResponse[6].assessName=tsobj2.assessName;
		      		this.assessResponse[6].assesslist=tsobj2.assesslist;
		      		if(this.assessnum==5){
		      			this.assessResponse[6].assessId='';
		      		}
		      	}
		      	if(val[5].assessId=="1"){
					this.assessResponse[6].Positionid=tsobj.Positionid;
		      		this.assessResponse[6].assessName=tsobj.assessName;
		      		this.assessResponse[6].assesslist=tsobj.assesslist;
		      		if(this.assessnum==5){
		      			this.assessResponse[6].assessId='';
		      		}
		      	}
		      }
	      },
	      deep:true
	    }
	 },
	methods: {
		shiqujd:function(){
			console.log(this.assessResponse[this.assessnum].assessId)
			if(this.assessResponse[this.assessnum].Positionid == 'jcjborhbsj' && Number(this.assessResponse[this.assessnum].assessId)){
				this.assessResponse[this.assessnum].assessId='';
				log_message("输入格式有误")
			}
		},
		zhuanchun:function(){
			ajaxzhancun(this.assessResponse)
		},
		openurl:function(){
			window.location.href='jieguo.html'
		},
		xizhe:function(){
			if(this.pglx=='zlnl_pg'){
				window.location.href='../pingguguize/html/zilinengli.html'
			}else if(this.pglx=='zn_pg'){
				window.location.href='../pingguguize/html/zhinengpinggu.html'
			}else if(this.pglx=='lngnzkzh_pg'){
				window.location.href='../pingguguize/html/gongnengzhuangkuang.html'
			}else if(this.pglx=='ddfx_pg'){
				window.location.href='../pingguguize/html/diedafengxian.html'
			}else if(this.pglx=='ddfx-frat_pg'){
				window.location.href='../pingguguize/html/didaofengxian-FRAT.html'
			}else if(this.pglx=='yyfx_pg'){
				window.location.href='../pingguguize/html/MNA-SF.html'
				document.getElementById('pingguname').innerHTML='营养风险评估';
			}else if(this.pglx=='wxzxfx_pg'){
				window.location.href='../pingguguize/html/wuxizhixi.html'
			}else if(this.pglx=='yy_pg'){
				window.location.href='../pingguguize/html/yiyu.html'
			}else if(this.pglx=='ycfx_pg'){
				window.location.href='../pingguguize/html/yachuang.html'
			}
		},
		opennum:function(num){
			this.Popupshow = true;
			this.assessnum = num;
		},
		choose:function(choosenum){
			this.assessResponse[this.assessnum].assessId = choosenum;
		},
		nextassess:function(){
			if(this.assessnum<this.assessResponse.length-1){
				this.assessnum+=1;
			} 
		},
		upassess:function(){
			if(this.assessnum>0){
				this.assessnum-=1;
			} 
		},
		closepinggu:function(styless){
			this.assessstyle=0;
			this.Popupshow=false;
		},
		tijiao:function(){
			if(this.completed == this.assessResponse.length){
				this.Popupshow=true;
				this.assessstyle=1;
				this.submitchoose()
			}else{
				log_message("还有未填写的");
			}
		},
		tijiaojieguo:function(){
			submitanswer(arranswers)
		},
		submitchoose:function(){
			var zhongfeng=0;
			for (var i=0;i<this.assessResponse.length;i++) {
				arranswers[this.assessResponse[i].Positionid]=this.assessResponse[i].assessId;
				if(pglx=='zlnl_pg'||pglx=='zn_pg'||pglx=='yyfx_pg'||pglx=='yy_pg'){
					zhongfeng+=parseInt(Number(this.assessResponse[i].assessId)||0);
				}
				if(pglx=='ycfx_pg'&&this.assessResponse[i].Positionid.substr(0, 3)!='hlc'){
					zhongfeng+=parseInt(Number(this.assessResponse[i].assessId));
				}
			}
			if(pglx=='zlnl_pg'){
				arranswers.hlryqm=this.pgry;
				if(zhongfeng<=40){
					arranswers.zlnldj='1';
					this.pgjgmc='1';
				}else if(zhongfeng>40&&zhongfeng<=60){
					arranswers.zlnldj='2';
					this.pgjgmc='2';
				}else if(zhongfeng>60&&zhongfeng<=99){
					arranswers.zlnldj='3';
					this.pgjgmc='3';
				}else if(zhongfeng=100){
					arranswers.zlnldj='4';
					this.pgjgmc='4';
				}
			}else if(pglx=='zn_pg'){
				arranswers.bz='';
				if(zhongfeng>20){
					arranswers.pgjg='0';
					this.pgjgmc='0';
				}else if(zhongfeng>15&&zhongfeng<=20){
					arranswers.pgjg='1';
					this.pgjgmc='1';
				}else if(zhongfeng>10&&zhongfeng<=15){
					arranswers.pgjg='2';
					this.pgjgmc='2';
				}else if(zhongfeng<10){
					arranswers.pgjg='3';
					this.pgjgmc='3';
				}
			}else if(pglx=='lngnzkzh_pg'){
//				arranswers.jzyy=this.jzyy;
				if(arranswers.pg_1<=20){
					arranswers.jl_1='正常';
				}else if(arranswers.pg_1>20){
					arranswers.jl_1='困难';
				}
				if(Number(arranswers.sl_1)+Number(arranswers.sl_2)<=1){
					arranswers.sl='视觉正常';
				}else if(Number(arranswers.sl_1)+Number(arranswers.sl_2)<=3&&Number(arranswers.sl_1)+Number(arranswers.sl_2)>=2){
					arranswers.sl='视觉障碍';
				}else if(Number(arranswers.sl_1)+Number(arranswers.sl_2)>=4){
					arranswers.sl='无视觉';
				}
				if(Number(arranswers.tl_1)+Number(arranswers.tl_2)<=1){
					arranswers.tl='听力正常';
				}else if(Number(arranswers.tl_1)+Number(arranswers.tl_2)<=3&&Number(arranswers.tl_1)+Number(arranswers.tl_2)>=2){
					arranswers.tl='听力障碍';
				}else if(Number(arranswers.tl_1)+Number(arranswers.tl_2)>=4){
					arranswers.tl='无听力';
				}
				arranswers.hz='';
				arranswers.pg_5=0;
				for(k in arranswers){
					if(k.substr(0, 2) == "hz"){
						if(arranswers[k]>=0){
							arranswers.hz+=arranswers[k]+','
							arranswers.pg_5++;
						}
						if(k!='hz'){
							delete arranswers[k]
						}
					}
				}
				if(arranswers.pg_4==0){
					arranswers.jl_5='痴呆'
				}else if(arranswers.pg_4<=2){
					arranswers.jl_5='认知功能缺陷'
				}else if(arranswers.pg_4>=3){
					arranswers.jl_5='认知功能正常'
				}
				arranswers.jyyy_1=arranswers.question_1;
				arranswers.jyyy_2=arranswers.question_2;
				arranswers.jyyy_3=arranswers.question_3;
				arranswers.jyyy_4=arranswers.question_4;
				arranswers.jyyy_5=arranswers.question_5;
				zhongfeng=Number(arranswers.question_1)+Number(arranswers.question_2)+Number(arranswers.question_3)+Number(arranswers.question_4)+Number(arranswers.question_5)
				if(zhongfeng<=1){
					arranswers.jyyyjl_1="正常"
				}else {
					arranswers.jyyyjl_1="抑郁情形"
				}
				arranswers.shgnpgb=Number(arranswers.question_6)+Number(arranswers.question_7)+Number(arranswers.question_8)+Number(arranswers.question_9)+Number(arranswers.question_10)+Number(arranswers.question_11);
				if(arranswers.shgnpgb<=2){
					arranswers.shpgjl_1='正常'
				}else{
					arranswers.shpgjl_1='欠缺'
				}
				arranswers.jjaq_1=arranswers.question_12;
				arranswers.jjaq_2=arranswers.question_13;
				arranswers.jjaq_3=arranswers.question_14;
				arranswers.jjaq_4=arranswers.question_15;
				arranswers.hjyspg=Number(arranswers.question_12)+Number(arranswers.question_13)+Number(arranswers.question_14)+Number(arranswers.question_15)
				if(arranswers.hjyspg<=1){
					arranswers.jjaqjj_1="宜居"
				}else{
					arranswers.jjaqjj_1="高危"
					
				}
				arranswers.lnzhzpg=Number(arranswers.question_16)+Number(arranswers.question_17)+Number(arranswers.question_18)+Number(arranswers.question_19)+Number(arranswers.question_20)+Number(arranswers.question_21)+Number(arranswers.question_22)+Number(arranswers.question_23)
				if(arranswers.lnzhzpg<=2){
					arranswers.ddfxjl_1='正常'
				}else{
					arranswers.ddfxjl_1='高危'
				}
			}else if(pglx=='ddfx_pg'){
				arranswers.gfx='';
				arranswers.ggxs='';
				arranswers.syyw='';
				arranswers.jbys='';
				arranswers.yfcs='';
				arranswers.nl=this.oldman.nl<='65'? '1':'2';
				 for(k in arranswers){
					if(k.substr(0, 3) == "gfx"){
						if(arranswers[k]>0){
							arranswers.gfx+=arranswers[k]+','
						}
						if(k!='gfx'){
							delete arranswers[k]
						}
					}else if(k.substr(0, 3) == "ggx"){
						if(arranswers[k]>0){
							if(arranswers[k]==1){
								zhongfeng+=1
							}else if(arranswers[k]==3){
								zhongfeng+=3
							}
							arranswers.ggxs+=arranswers[k]+','
						}
						if(k!='ggxs'){
							delete arranswers[k]
						}
					}else if(k.substr(0, 3) == "syy"){
						if(arranswers[k]>-1){
							arranswers.syyw+=arranswers[k]+','
							if(arranswers[k]==1||arranswers[k]==2||arranswers[k]==4||arranswers[k]==5){
								zhongfeng+=1
							}else if(arranswers[k]==3||arranswers[k]==6){
								zhongfeng+=2
							}
						}
						if(k!='syyw'){
							delete arranswers[k]
						}
					}else if(k.substr(0, 3) == "jby"){
						if(arranswers[k]>-1){
							arranswers.jbys+=arranswers[k]+','
							if(arranswers[k]==1||arranswers[k]==3){
								zhongfeng+=3
							}else if(arranswers[k]==2){
								zhongfeng+=2
							}
						}
						if(k!='jbys'){
							delete arranswers[k]
						}
					}else if(k.substr(0, 3) == "yfc"){
						if(arranswers[k]!=0&&arranswers.yfcs!=arranswers[k]){
							arranswers.yfcs+=arranswers[k]+','
						}
						if(k!='yfcs'){
							delete arranswers[k]
						}
					}
	             }
				 if(arranswers.gfx.length>1){
				 	zhongfeng+=6;
				 }
				if(zhongfeng<3){
					arranswers.fxdj='1';
					this.pgjgmc='1';
				}else if(zhongfeng>=3&&zhongfeng<=5){
					arranswers.fxdj='2';
					this.pgjgmc='2';
				}else if(zhongfeng>5){
					arranswers.fxdj='3';
					this.pgjgmc='3';
				}
				arranswers.yfcsqt=this.yfcsqt;
			}else if(pglx=='ddfx-frat_pg'){
				arranswers.yd='';
				arranswers.dds='';
				arranswers.jsbwdzt='';
				arranswers.zknl='';
				arranswers.gjza='';
				arranswers.smzt='';
				arranswers.yys='';
				arranswers.xgbs='';
				arranswers.bz='';
				for(k in arranswers){
					if(k.substr(0, 2) == "yd"){
						if(arranswers[k]>=0){
							arranswers.yd+=arranswers[k]+','
							zhongfeng+=3
						}
						if(k!='yd'){
							delete arranswers[k]
						}
					}else if(k.substr(0, 3) == "dds"){
						if(arranswers[k]>=0){
							arranswers.dds+=arranswers[k]+','
							if(arranswers[k]==0){
								zhongfeng+=2
							}else if(arranswers[k]==1){
								zhongfeng+=3
							}
						}
						if(k!='dds'){
							delete arranswers[k]
						}
					}else if(k.substr(0, 3) == "jsb"){
						if(arranswers[k]>=0){
							if(arranswers[k]){arranswers.jsbwdzt+=arranswers[k]+','}
							if(arranswers[k]==2){
								zhongfeng+=2
							}else{
								zhongfeng+=3
							}
						}
						if(k!='jsbwdzt'){
							delete arranswers[k]
						}
					}else if(k.substr(0, 3) == "zkn"){
						if(arranswers[k]>=0){
							arranswers.zknl+=arranswers[k]+','
							zhongfeng+=1
						}
						if(k!='zknl'){
							delete arranswers[k]
						}
					}else if(k.substr(0, 3) == "gjz"){
						if(arranswers[k]>=0){
							arranswers.gjza+=arranswers[k]+','
							zhongfeng+=1
						}
						if(k!='gjza'){
							delete arranswers[k]
						}
					}else if(k.substr(0, 3) == "smz"){
						if(arranswers[k]>=0){
							arranswers.smzt+=arranswers[k]+','
							zhongfeng+=1
						}
						if(k!='smzt'){
							delete arranswers[k]
						}
					}else if(k.substr(0, 3) == "yys"){
						if(arranswers[k]>=0){
							arranswers.yys+=arranswers[k]+','
							zhongfeng+=1
						}
						if(k!='yys'){
							delete arranswers[k]
						}
					}else if(k.substr(0, 3) == "xgb"){
						if(arranswers[k]>=0){
							arranswers.xgbs+=arranswers[k]+','
							if(arranswers[k]==4){
								zhongfeng+=3
							}else{
								zhongfeng+=1
							}
						}
						if(k!='xgbs'){
							delete arranswers[k]
						}
					}
				}
				if(zhongfeng==0){
					arranswers.fxdj='1';
					this.pgjgmc='1';
				}else if(zhongfeng>=1&&zhongfeng<=2){
					arranswers.fxdj='2';
					this.pgjgmc='2';
				}else if(zhongfeng>=3&&zhongfeng<=9){
					arranswers.fxdj='3';
					this.pgjgmc='3';
				}else if(zhongfeng>=10){
					arranswers.fxdj='4';
					this.pgjgmc='4';
				}
			}else if(pglx=='yyfx_pg'){
				zhongfeng=zhongfeng-Number(arranswers.stzs)-Number(arranswers.tsyx1)-Number(arranswers.tsyx2)-Number(arranswers.yl)
				if(arranswers.tsyx1=='1'){
					arranswers.tsyx='0,'+(arranswers.tsyx2==1 ? '1':'');
					delete arranswers.tsyx1
					delete arranswers.tsyx2
				}else{
					arranswers.tsyx=arranswers.tsyx2==1 ? '1':'';
					delete arranswers.tsyx1
					delete arranswers.tsyx2
				}
				if(zhongfeng<=7){
					arranswers.pdzt='3'
					this.pgjgmc='3';
				}else if(zhongfeng>7&&zhongfeng<12){
					arranswers.pdzt='2'
					this.pgjgmc='2';
				}else{
					arranswers.pdzt='1'
					this.pgjgmc='1';
				}
//				arranswers.jcjborhbsj=this.jcjborhbsj;
			}else if(pglx=='wxzxfx_pg'){
				zhongfeng=Number(arranswers.age)+Number(arranswers.syyw);
				arranswers.sjss='';
				arranswers.jbys='';
				arranswers.yfcs='';
				if(zhongfeng<=2){
					arranswers.fxdj='0'
					this.pgjgmc='0';
				}else if(zhongfeng<=4&&zhongfeng>2){
					arranswers.fxdj='1'
					this.pgjgmc='1';
				}else{
					arranswers.fxdj='2'
					this.pgjgmc='2';
				}
				for(k in arranswers){
					if(k.substr(0, 3) == "sjs"){
						if(arranswers[k]>0){
							arranswers.sjss+=arranswers[k]+','
							zhongfeng+=1
						}
						if(k!='sjss'){
							delete arranswers[k]
						}
					}else if(k.substr(0, 3) == "jby"){
						if(arranswers[k]>0){
							arranswers.jbys+=arranswers[k]+','
							if(arranswers[k]==1){
								zhongfeng+=1
							}else if(arranswers[k]==2||arranswers[k]==3||arranswers[k]==5){
								zhongfeng+=2
							}else if(arranswers[k]==4||arranswers[k]==6){
								zhongfeng+=3
							}else{
								zhongfeng+=5
							}
						}
						if(k!='jbys'){
							delete arranswers[k]
						}
					}else if(k.substr(0, 3) == "yfc"){
						if(arranswers[k]!=0&&arranswers.yfcs!=arranswers[k]){
							arranswers.yfcs+=arranswers[k]+','
						}
						if(k!='yfcs'){
							delete arranswers[k]
						}
					}
				}
				arranswers.yfcsqt=this.yfcsqt;
			}else if(pglx=='yy_pg'){
				zhongfeng=zhongfeng-Number(arranswers.crybs)
				arranswers.pz='';
				if(zhongfeng>=2){
					arranswers.pgjg='0';
					this.pgjgmc='0';
				}else{
					arranswers.pgjg='1';
					this.pgjgmc='1';
				}
			}else if(pglx=='ycfx_pg'){
				arranswers.hlcs='';
				arranswers.yfcsqt=this.yfcsqt;
				for(k in arranswers){
					if(k.substr(0, 3) == "hlc"){
						if(arranswers[k]!=0&&arranswers.hlcs!=arranswers[k]){
							arranswers.hlcs+=arranswers[k]+','
						}
						if(k!='hlcs'){
							delete arranswers[k]
						}
					}
				}
			}
			arranswers.ylms=this.jjpg;
			arranswers.sfscpg=this.sfscpg;
			arranswers.pgcs=this.pgcs;
			arranswers.pgzf=zhongfeng;//总分
			this.pgzhongfeng=zhongfeng;
			arranswers.pgrq=(new Date()).toLocaleDateString();
			arranswers.pgr=this.pgry;
		}
	},
})
function submitanswer(arranswers){
	if(zhanchuntimu.id){
		ajaxshanzhancun()
	}
	var postdata={
			'pgdxId':pgoldinfo.id,
			'pgdxxm':pgoldinfo.xm,
			'ylms':main.jjpg,//是否居家评估
			'sfscpg':main.pgcs>'0'?'1':'0',//是否首次评估
			'pgrxm':user_info.name,
			'pgrq':(new Date()).getFullYear()+'-'+((new Date()).getMonth()+1)+'-'+(new Date()).getDate(),//((new Date()).toLocaleDateString()).replace(/\//g, "-"),
			'pglxId':pglx,//评估类型id
			'pgnr':JSON.stringify(arranswers),//评估内容//	console.log(JSON.stringify(data));
			'score':arranswers.pgzf,//评估总分
			'pgjgId':user_info.hospitalId,
			'pgjg':user_info.hospitalName,
			'pgjgmc':main.pgjgmc
		}
	for( var key in postdata){
		if(postdata.hasOwnProperty(key)===true){
			 pgoldinfo[key]=postdata[key]
		}
	}
	sessionStorage.pgoldinfo=JSON.stringify(pgoldinfo)
	ajaxPostJson(
		Url.ASSESS_ADDEVALUATE,
		postdata,
		function(data){
			console.log(data)
			if(data.status=='1'){
				log_message('提交成功')
				main.Popupshow=true;
				main.assessstyle=2;
			}
		}
	)
}
function ajaxzhancun(zcnr){
	ajaxPost(
		Url.ASSESS_ZANCUN,
		{
			"Id":zhanchuntimu.id||'',
			"pgdx_Id":pgoldinfo.id,
			"pgjg_Id":user_info.hospitalId,
			"pglx_Id":pglx,
			"pgnr":JSON.stringify(zcnr)
		},
		function(data){
			if(data.status=='1'){log_message(data.message)}
		}
	)
}
function ajaxshanzhancun(){
	ajaxPost(
		Url.ASSESS_ZANCUNSANCHU,
		{
			"id":zhanchuntimu.id||'',
		},
		function(data){
			console.log(data)
		}
	)
}
ajaxPost(
	Url.ASSESS_CXPGCS,
	{
		"elderId":pgoldinfo.id,
		"pglxId":pglx
	},
	function(data){
		document.getElementById("main").setAttribute("style","display: block;height: 88%");
		if(!isNaN(data)){
			main.pgcs=data;
		}
	}
)